home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / wildcat / qwkhold1.zip / LOGON2.WCX (.txt) < prev    next >
Wildcat! WCX  |  1996-05-17  |  9KB  |  506 lines

  1. '! Decompiled with wccNosy version 4.20f (freeware)
  2. '! Input File: in.wcx  9334 bytes  03/09/122  08:19:16am
  3. '! Code Segment Size  :6387 bytes
  4. '! Data Segment Size  :4986 bytes
  5. '! String Segment Size:2947 bytes
  6. '! Compiled with WCC version 4.12
  7.  
  8.       Dim i4463 As Integer
  9.       Dim s4465 As String
  10.       Dim s4469 As String
  11.       Dim d4473 As Date
  12.       Dim i4475 As Integer
  13.       Dim s4477 As String
  14.       Dim s4481 As String
  15.       Dim s4485 As String
  16.       Dim w4489 As Word
  17.       Dim s4491 As String
  18.       Dim sr4495 As SearchRec
  19.       Dim l4544 As Long
  20.       Dim i4548 As Integer
  21.       Dim i4552 As Integer
  22.       Dim i4554 As Integer
  23.       Dim l4556 As Long
  24.       Dim i4882 As Integer
  25.       Dim s4884 As String
  26.       Dim i4888 As Integer
  27.       Dim i4890 As Integer
  28.       Dim s4894 As String
  29.       Dim s4898 As String
  30.       Dim s4902 As String
  31.       Dim s4906 As String
  32.       Dim s4910 As String
  33.       Dim s4914 As String
  34.       Dim s4918 As String
  35.       Dim s4922 As String
  36.       Dim s4926 As String
  37.       Dim s4930 As String
  38.       Dim s4936 As String
  39.       Dim s4940 As String
  40.       Dim s4948 As String
  41.       Dim i4952 As Integer
  42.       Dim i4954 As Integer
  43.       Dim s4956 As String
  44.       Dim s4960 As String
  45.       Dim s4964 As String
  46.       Dim l4968 As Long
  47.       Dim s4972 As String
  48.       Dim s4976 As String
  49.       Dim i4980 As Integer
  50.  
  51.       Dim l65524_ As Long
  52.       Dim i65528_ As Integer
  53.       Dim l65530_ As Long
  54.       Dim i65534_ As Integer
  55.  
  56.       s4469 = "QWK2: Logon program was started."
  57.       ActivityLog s4469
  58.       EnablePages 0
  59.       s4491 = ProgPath + "QWK2HOLD.CFG"
  60.       If Exists(s4491) Then
  61.         Open s4491 For Input As 1
  62.         If Not Local Then
  63.           CarrierCheck(0)
  64.         End If
  65.   122   LockFile(1, 0, 1)
  66.         Input #1, s4976
  67.         Input #1, i4980
  68.         Input #1, s4948
  69.         Input #1, s4936
  70.         Input #1, s4960
  71.         Input #1, s4964
  72.         Input #1, i4554
  73.         Input #1, i4552
  74.         Input #1, l4556
  75.         Input #1, i4882
  76.         Input #1, s4898
  77.         Input #1, s4902
  78.         Input #1, s4906
  79.         Input #1, s4910
  80.         Input #1, s4940
  81.         Input #1, s4914
  82.         Input #1, s4918
  83.         Input #1, s4922
  84.         Input #1, s4926
  85.         Input #1, s4930
  86.         UnlockFile(1, 0, 1)
  87.         Close 1
  88.         If Not Local Then
  89.           CarrierCheck(-1)
  90.         End If
  91.   308 Else
  92.   314   i4463 = 0
  93.         GoTo 5108
  94.       End If
  95.   326 If User.SecLevel = s4960 Or User.SecLevel = s4964 Then
  96.         i4463 = 23
  97.       Else
  98.   379   If s4976 = "" Then
  99.           i4463 = 1
  100.           GoTo 5108
  101.         Else
  102.   415     s4976 = Trim(UCase(s4976))
  103.           If Mid(s4976, 2, 2) <> ":\" Then
  104.             i4463 = 1
  105.             GoTo 5108
  106.           End If
  107.   466     If Right(s4976, 1) <> "\" Then
  108.             s4976 = s4976 + "\"
  109.           End If
  110.         End If
  111.   503   If s4948 = "" Then
  112.           i4463 = 2
  113.           GoTo 5108
  114.         Else
  115.   539     s4948 = Trim(UCase(s4948))
  116.           If Mid(s4948, 2, 2) <> ":\" Then
  117.             i4463 = 2
  118.             GoTo 5108
  119.           End If
  120.   590     If Right(s4948, 1) <> "\" Then
  121.             s4948 = s4948 + "\"
  122.           End If
  123.         End If
  124.   627   If s4936 = "" Then
  125.           i4463 = 3
  126.           GoTo 5108
  127.         Else
  128.   663     s4936 = UCase(s4936)
  129.         End If
  130.   674   If s4960 = "" Then
  131.           s4960 = "NO SEC1"
  132.         Else
  133.   706     s4960 = Trim(UCase(s4960))
  134.         End If
  135.   720   If s4964 = "" Then
  136.           s4964 = "NO SEC2"
  137.         Else
  138.   752     s4964 = Trim(UCase(s4964))
  139.         End If
  140.   766   If s4940 = "" Then
  141.           i4463 = 15
  142.           GoTo 5108
  143.         Else
  144.   802     s4940 = Trim(UCase(s4940))
  145.           If Mid(s4940, 2, 2) <> ":\" Then
  146.             i4463 = 15
  147.             GoTo 5108
  148.           End If
  149.   853     If Right(s4940, 1) <> "\" Then
  150.             s4940 = s4940 + "\"
  151.           End If
  152.         End If
  153.   890   If i4554 <= 0 Then
  154.           i4554 = 1
  155.         End If
  156.   911   If i4554 >= 26 Then
  157.           i4554 = 26
  158.         End If
  159.   933   If i4552 <= 0 Then
  160.           i4552 = 0
  161.         End If
  162.   953   If i4552 >= 365 Then
  163.           i4552 = 365
  164.         End If
  165.   977   If l4556 <= 0 Then
  166.           l4556 = 2147483647
  167.         End If
  168.  1001   If l4556 >= 2147483647 Then
  169.           l4556 = 2147483647
  170.         End If
  171.  1029   If s4898 = "" Or Len(s4898) <> 2 Then
  172.           s4898 = "@0E@"
  173.         Else
  174.  1074     s4898 = "@" + UCase(s4898) + "@"
  175.         End If
  176.  1099   If s4902 = "" Or Len(s4902) <> 2 Then
  177.           s4902 = "@0F@"
  178.         Else
  179.  1144     s4902 = "@" + UCase(s4902) + "@"
  180.         End If
  181.  1169   If s4906 = "" Or Len(s4906) <> 2 Then
  182.           s4906 = "@0B@"
  183.         Else
  184.  1214     s4906 = "@" + UCase(s4906) + "@"
  185.         End If
  186.  1239   If s4910 = "" Or Len(s4910) <> 2 Then
  187.           s4910 = "@0C@"
  188.         Else
  189.  1284     s4910 = "@" + UCase(s4910) + "@"
  190.         End If
  191.  1309   CurrentDate d4473
  192.         s4465 = FormatDate(d4473, "ddmmyyyy")
  193.         s4477 = Left(s4465, 2)
  194.         s4481 = Mid(s4465, 3, 2)
  195.         s4485 = Mid(s4465, 5, 4)
  196.         i4475 = (Val(s4485) - 1980) * 512 + Val(s4481) * 32 + Val(s4477)
  197.         If s4976 = s4948 Then
  198.           s4469 = "QWK2: Line #1 and Line #3 of QWK2HOLD.CFG MUST NOT be the same."
  199.           ActivityLog s4469
  200.           GoTo 6235
  201.         End If
  202.  1455   i4888 = 0
  203.         i4548 = 0
  204.  1467   Do While i4548 < i4554
  205.           s4884 = s4948 + Str(User.UserId) + ".QW" + Chr(i4888 + 65)
  206.           s4894 = s4948 + Str(User.UserId) + ".QW" + Chr(i4548 + 65)
  207.           If Exists(s4894) Then
  208.             i4548 = i4548 + 1
  209.             i4888 = i4888 + 1
  210.             If s4894 <> s4884 Then
  211.               Name s4894 As s4884
  212.             End If
  213.  1639     Else
  214.  1645       i4548 = i4548 + 1
  215.           End If
  216.  1659   Loop
  217.  1665   i4952 = i4888
  218.         i4888 = 0
  219.         s4884 = s4948 + Str(User.UserId) + ".QWA"
  220.         s4894 = s4976 + Str(User.UserId) + ".QWK"
  221.         If Exists(s4940 + "QWK2MA1.FLG") Then
  222.           i4888 = 1
  223.           If s4914 <> "" Then
  224.             Print s4910; s4914
  225.           Else
  226.  1803       Print s4910; "Mail Flag #1 is currently flying high."
  227.           End If
  228.         End If
  229.  1818   If Exists(s4940 + "QWK2MA2.FLG") Then
  230.           i4888 = 1
  231.           If s4918 <> "" Then
  232.             Print s4910; s4918
  233.           Else
  234.  1882       Print s4910; "Mail Flag #2 is currently flying high."
  235.           End If
  236.         End If
  237.  1897   If Exists(s4940 + "QWK2MA3.FLG") Then
  238.           i4888 = 1
  239.           If s4922 <> "" Then
  240.             Print s4910; s4922
  241.           Else
  242.  1961       Print s4910; "Mail Flag #3 is currently flying high."
  243.           End If
  244.         End If
  245.  1976   If Exists(s4940 + "QWK2MA4.FLG") Then
  246.           i4888 = 1
  247.           If s4926 <> "" Then
  248.             Print s4910; s4926
  249.           Else
  250.  2040       Print s4910; "Mail Flag #4 is currently flying high."
  251.           End If
  252.         End If
  253.  2055   If Exists(s4940 + "QWK2MA5.FLG") Then
  254.           i4888 = 1
  255.           If s4930 <> "" Then
  256.             Print s4910; s4930
  257.           Else
  258.  2119       Print s4910; "Mail Flag #5 is currently flying high."
  259.           End If
  260.         End If
  261.  2134   Print
  262.         If Trim(Left(User.Comment(Val(Mid(s4936, 9, 1))), 8)) = "QWK2 ON" Then
  263.           If i4888 = 1 Then
  264.             Print s4906; "If you are still ""Online"" when your QWK Packet(s) are due to be made"
  265.             Print s4906; "then yours will be skipped till the next time mail is processed."
  266.             Print
  267.             Delay 3
  268.           End If
  269.  2261   Else
  270.  2267     If i4888 = 1 Then
  271.             Delay 3
  272.           End If
  273.         End If
  274.  2290   If Exists(s4884) Or Exists(s4894) Then
  275.           i4548 = 0
  276.           Print s4898; "At least one QWK mail packet is on hold, looking for others."
  277.           Print
  278.           Print s4898; "  FileName    Size in Kbytes    Age"; s4902
  279.           s4884 = s4948 + Str(User.UserId) + ".QW" + Chr(i4548 + 65)
  280.           s4894 = s4948 + Str(User.UserId) + ".QW" + Chr(i4888 + 65)
  281.           i4548 = 0
  282.  2448     Do While i4548 < i4554
  283.             s4884 = s4948 + Str(User.UserId) + ".QW" + Chr(i4548 + 65)
  284.             If Exists(s4884) Then
  285.               FindFirst(s4884, 0, sr4495)
  286.               l4544 = sr4495.Size
  287.               w4489 = sr4495.DOSDate
  288.               l4968 = l4968 + sr4495.Size
  289.               Print s4902; LeftPad(UCase(Trim(MakeWild.PacketId)) + ".QW" + Chr(i4548 + 65), 8);
  290.               Print s4906; LeftPad(Str(Int(sr4495.Size / 100)), 11);
  291.               Print s4902; LeftPad(Str(i4475 - w4489), 10);
  292.               If i4475 - w4489 = 1 Then
  293.                 Print s4898; " Day"
  294.               Else
  295.  2746           If i4475 - w4489 = 0 Then
  296.                   Print s4898; " Today"
  297.                 Else
  298.  2788             Print s4898; " Days"
  299.                 End If
  300.               End If
  301.  2803       Else
  302.  2809         GoTo 2835
  303.             End If
  304.  2815       i4548 = i4548 + 1
  305.           Loop
  306.  2835     s4465 = s4948 + Str(User.UserId)
  307.           If i4952 >= 26 Then
  308.             i4888 = 48
  309.           Else
  310.  2885       i4888 = i4952 + 1
  311.           End If
  312.  2899     s4884 = s4465 + ".QW" + Chr(i4888)
  313.           s4894 = s4976 + Str(User.UserId) + ".QWK"
  314.           If Exists(s4894) Then
  315.             CopyFile(s4894, s4884)
  316.             s4465 = Str(User.UserId) + ".QWK"
  317.             DeleteFile(s4465, i4980, 1)
  318.             i4952 = i4952 + 1
  319.             FindFirst(s4884, 0, sr4495)
  320.             l4544 = sr4495.Size
  321.             l4968 = l4968 + sr4495.Size
  322.             Print LeftPad(sr4495.Name, 12) + LeftPad(Str(Int(sr4495.Size / 100)), 14)
  323.           End If
  324.  3126   Else
  325.  3132     i4890 = Val(Mid(s4936, 9, 1))
  326.           If Trim(Left(User.Comment(i4890), 8)) <> "QWK2 ON" Then
  327.             GoTo 6235
  328.           End If
  329.  3218     Print s4910; "There are no QWK mail packets on hold for you at this time."
  330.           Print
  331.           Delay 3
  332.           GoTo 6235
  333.         End If
  334.  3249   Print s4898; "You have "; s4902; i4952; s4898; " mail packet";
  335.         If i4952 > 1 Then
  336.           Print "s";
  337.         End If
  338.  3314   Print " for a total of "; s4906; Int(l4968 / 100); s4898; " Kbytes."
  339.         If i4952 >= 1 Then
  340.           Print s4898; "Do you want to download";
  341.           If i4952 > 1 Then
  342.             Print " all packets";
  343.           Else
  344.  3420       Print " the packet";
  345.           End If
  346.  3429     Print " now or just the first one?"
  347.           Print
  348.           Print s4902; "The following choices are available for your use:"
  349.           Print s4898; "["; s4902; "A"; s4898; "]ll packets downloaded now and continue."
  350.           Print s4898; "["; s4902; "D"; s4898; "]ownload all packets now and log off of the BBS."
  351.           Print s4898; "["; s4902; "F"; s4898; "]irst, download only first packet and continue."
  352.           Print s4898; "["; s4902; "N"; s4898; "]o packets downloaded at this time, continue with BBS."
  353.           Print
  354.           s4469 = InputMask(s4898 + "Choose [" + s4902 + "A" + s4898 + "]ll, [" + s4902 + "D" + s4898 + "]ownload & Goodbye, [" + s4902 + "F" + s4898 + "]irst, or [" + s4902 + "N" + s4898 + "]one ", "X", "A", 1213417543)
  355.           s4469 = UCase(s4469)
  356.           s4972 = s4469
  357.           If s4469 = "N" Then
  358.             Print
  359.             GoTo 6235
  360.           End If
  361.  3802     If s4469 = "A" Then
  362.             If i4952 > 1 Then
  363.               Print s4898; "The mail packets will be sent in sequence, one right after the other."
  364.               Print s4906; "There will be a short pause between packets, please be patient."
  365.             End If
  366.           End If
  367.         End If
  368.  3864   If Local Then
  369.           Print
  370.           Print s4898; "Enter the path where you want your mail packets to wind up."
  371.           Print s4898; "Please use the following format shown in example: "; s4902; "C:\QWK\"; UCase(Trim(MakeWild.PacketId)); s4898; "."
  372.           s4956 = InputMask("-->", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "", 1213417543)
  373.           If s4956 = "" Then
  374.             i4463 = 21
  375.             GoTo 5108
  376.           End If
  377.  4006     s4956 = Trim(UCase(s4956))
  378.           If Mid(s4956, 2, 2) <> ":\" Then
  379.             i4463 = 21
  380.             GoTo 5108
  381.           End If
  382.  4057     If Right(s4956, 1) = "\" Then
  383.             i4888 = Len(s4956) - 1
  384.             s4956 = Left(s4956, i4888)
  385.           End If
  386.         End If
  387.  4111   Print
  388.         If s4972 <> "A" Then
  389.           s4469 = InputMask(s4898 + "Hit the Enter key to begin the file transfer or [" + s4902 + "A" + s4898 + "] to abort.", "X", "", 1213417543)
  390.           If UCase(Left(s4469, 1)) = "A" Then
  391.             s4972 = ""
  392.             GoTo 6235
  393.           End If
  394.         End If
  395.  4229   i4954 = i4952
  396.  4266   For i4548 = 0 To i4952 - 1 Step 1
  397.           s4894 = s4948 + Str(User.UserId) + ".QW" + Chr(i4548 + 65)
  398.           s4469 = TempPath
  399.           s4884 = s4469 + UCase(Trim(MakeWild.PacketId)) + ".QW" + Chr(i4548 + 65)
  400.           If Local Then
  401.             If Len(s4956) <= 20 Then
  402.               PushCommand s4956
  403.             End If
  404.           End If
  405.  4446     CopyFile(s4894, s4884)
  406.           Del s4894
  407.           If SendFile(s4884, 1213417543) Then
  408.             s4469 = UCase(Trim(MakeWild.PacketId)) + ".QW" + Chr(i4548 + 65)
  409.             ActivityLog "QWK2: File " + s4469 + " was downloaded successfully."
  410.             Del s4884
  411.             i4954 = i4954 - 1
  412.           Else
  413.  4572       Print s4910; " Mail transfer failed."; s4898
  414.             CopyFile(s4884, s4894)
  415.             Del s4884
  416.             s4469 = UCase(Trim(MakeWild.PacketId)) + ".QW" + Chr(i4548 + 65)
  417.             ActivityLog "QWK2: " + s4469 + " was not downloaded successfully."
  418.             GoTo 4838
  419.           End If
  420.  4680     If s4972 = "F" Then
  421.             Print
  422.             s4469 = InputMask(s4898 + "[" + s4902 + "N" + s4898 + "]ext File, [" + s4902 + "S" + s4898 + "]top Downloading ", "X", "N", 1213417543)
  423.             If UCase(Left(s4469, 1)) = "S" Then
  424.               GoTo 4838
  425.             End If
  426.           End If
  427.  4815   Next
  428.  4838   If Not (i4954 = i4952) Then
  429.           i4888 = i4952 - i4954
  430.           i4952 = i4954
  431.  4912     For i4548 = 0 To i4954 - 1 Step 1
  432.             s4884 = Trim(s4948) + Str(User.UserId) + ".QW" + Chr(i4548 + 65)
  433.             s4894 = Trim(s4948) + Str(User.UserId) + ".QW" + Chr(i4888 + 65)
  434.             Name s4894 As s4884
  435.             i4888 = i4888 + 1
  436.           Next
  437.         End If
  438.  5102   GoTo 6235
  439.       End If
  440.  5108 If i4463 >= 0 And i4463 <= 19 Then
  441.         Cls 
  442.         Print
  443.         If i4463 = 0 Then
  444.           Print s4910; "The QWK2HOLD.CFG file was not located."
  445.         Else
  446.  5173     Print s4898; "Line ["; s4902; i4463; s4898; "] of the "; s4902; "QWK2HOLD.CFG"; s4898; " has a problem."
  447.         End If
  448.  5240   Print
  449.         Print s4898; "The current values of your "; s4902; "QWK2HOLD.CFG"; s4898; " file are"; s4902; ":"
  450.         Print s4898; "Line  #1 = ["; s4902; s4976; s4898; "]"
  451.         Print s4898; "Line  #2 = ["; s4902; i4980; s4898; "]"
  452.         Print s4898; "Line  #3 = ["; s4902; s4948; s4898; "]"
  453.         Print s4898; "Line  #4 = ["; s4902; s4936; s4898; "]"
  454.         Print s4898; "Line  #5 = ["; s4902; s4960; s4898; "]"
  455.         Print s4898; "Line  #6 = ["; s4902; s4964; s4898; "]"
  456.         Print s4898; "Line  #7 = ["; s4902; i4554; s4898; "]"
  457.         Print s4898; "Line  #8 = ["; s4902; i4552; s4898; "]"
  458.         Print s4898; "Line  #9 = ["; s4902; l4556; s4898; "]"
  459.         Print s4898; "Line #10 = ["; s4902; i4882; s4898; "]"
  460.         Print s4898; "Line #11 = ["; s4902; Mid(s4898, 2, 2); s4898; "]"
  461.         Print s4898; "Line #12 = ["; s4902; Mid(s4902, 2, 2); s4898; "]"
  462.         Print s4898; "Line #13 = ["; s4902; Mid(s4906, 2, 2); s4898; "]"
  463.         Print s4898; "Line #14 = ["; s4902; Mid(s4910, 2, 2); s4898; "]"
  464.         Print s4898; "Line #15 = ["; s4902; s4940; s4898; "]"
  465.         Print
  466.         Print s4898; "Waiting for "; s4902; "60"; s4898; " seconds before ending program."
  467.         Delay 60
  468.         s4469 = "QWK2: Your QWK2HOLD.CFG has a problem with line #" + Str(i4463) + "."
  469.         ActivityLog s4469
  470.       Else
  471.  6019   If i4463 = 20 Then
  472.           Print
  473.           Print s4898; "Your input did not make sense, you may not download your QWK"
  474.           Print s4898; "packet at this time."
  475.           Print
  476.           s4469 = "QWK2: User's input was confusing, program aborted."
  477.           ActivityLog s4469
  478.         Else
  479.  6090     If i4463 = 21 Then
  480.             Print
  481.             Print s4898; "The path you supplied could not be located.  Mail packet"
  482.             Print s4898; "transfer did not take place at this time."
  483.             Print
  484.             s4469 = "QWK2: User's supplied path was not located, program aborted"
  485.             ActivityLog s4469
  486.           Else
  487.  6161       If i4463 = 22 Then
  488.               s4469 = "QWK2: User does not have QWK checking turned on."
  489.               ActivityLog s4469
  490.             Else
  491.  6198         If i4463 = 23 Then
  492.                 s4469 = "QWK2: User did not meet security requirements for QWK2."
  493.                 ActivityLog s4469
  494.                 GoTo 6235
  495.               End If
  496.             End If
  497.           End If
  498.         End If
  499.       End If
  500.  6235 s4469 = "QWK2: Logon program has ended."
  501.       ActivityLog s4469
  502.       If s4972 = "D" Then
  503.         Goodbye -1
  504.       End If
  505.  6274 End 
  506.